package com.farecrawler.app.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.HttpServletBean;

import com.farecrawler.app.main.FarecrawlMain;

@SuppressWarnings("serial")
public class FareCrawlerServlet extends HttpServletBean {
	
	
	@Override
	protected void doGet(HttpServletRequest arg0, HttpServletResponse arg1)
			throws ServletException, IOException {

		super.doGet(arg0, arg1);
		FarecrawlMain farecrawlMain = new FarecrawlMain();
		farecrawlMain.start();
	}
	
	@Override
	protected void doPost(HttpServletRequest arg0, HttpServletResponse arg1)
			throws ServletException, IOException {
		
		super.doPost(arg0, arg1);
		doGet(arg0, arg1);
	}

}
